package net.apexes.demo.query;

import com.j256.ormlite.dao.Dao;
import com.j256.ormlite.jdbc.JdbcPooledConnectionSource;
import com.j256.ormlite.support.ConnectionSource;
import net.apexes.commons.ormlite.DatabaseHelper;
import net.apexes.demo.codegen.ormlite.column.QPay;
import net.apexes.demo.codegen.ormlite.entity.Pay;

public class OrmliteQueryDemo {

    public static void main(String[] args) throws Exception {
        ConnectionSource connSource = new JdbcPooledConnectionSource("jdbc:h2:mem:");
        testSelect(connSource);
    }

    static void testSelect(ConnectionSource connSource) throws Exception {
        DatabaseHelper helper = new OrmliteDemoDatabaseHelper(connSource);
        Dao<Pay, String> dao = helper.dao(QPay.$);
    }
}
